package com.tjetc.字符流;

import java.io.*;

public class T05缓冲流的文件拷贝 {
    public static void main(String[] args) throws IOException {
        //开管放大袋子
        BufferedReader bufferedReader = new BufferedReader(new FileReader("a.txt"));
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("b.txt"));
        String line ;

        while((line=bufferedReader.readLine())!=null){
            bufferedWriter.write(line);
            bufferedWriter.newLine();//添加换行符
        }
        bufferedReader.close();
        bufferedWriter.close();
    }
}
